import random
import matplotlib.pyplot as plt


direction_1 = '一餐一楼'
direction_2 = '一餐三楼'
direction_3 = '二餐'
direction_4 = '三餐'
stata = []


def order_a_canteen(res):
    if res == 1:
        print(direction_1)
        stata.append(direction_1)
    if res == 2:
        print(direction_2)
        stata.append(direction_2)
    if res == 3:
        print(direction_3)
        stata.append(direction_3)
    if res == 4:
        print(direction_4)
        stata.append(direction_4)


if __name__ == '__main__':
    for i in range(100):
        result = random.randint(1, 4)
        order_a_canteen(result)

    plt.figure(figsize=(20, 8), dpi=80)
    plt.barh(stata, range(len(stata)))
